# _*_ coding: UTF-8 _*_
# @Time     : 2022/4/25 14:57
# @Author   : Li Jie
# @Site     : http://www.cdtest.cn/
# @File     : index_001_search_content.py
# @Software : PyCharm

import unittest  # 导入测试框架

from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait  # 导入显式等待类
from selenium.webdriver.support import expected_conditions  # 导入等待条件
from selenium.webdriver.common.action_chains import ActionChains

from po.page.index_page import IndexPage  # 导入首页类

"""
test
"""
class Index001(unittest.TestCase):
    def setUp(self) -> None:
        self.driver = webdriver.Chrome()
        self.wait = WebDriverWait(self.driver, 30)

        # 生成首页类对象
        self.index_page = IndexPage(self.driver, self.wait)

    def test(self):
        self.driver.get("https://www.baidu.com/")
        self.driver.maximize_window()

        self.index_page.input_search_box("51放假安排")
        self.index_page.click_search_button()
        # time.sleep(5)

    def tearDown(self) -> None:
        self.driver.quit()
